#include "radio_my.h"

#include <QMouseEvent>
#include <QInputDialog>

Radio_my::Radio_my()
{

}
Radio_my::Radio_my(QWidget *parent):
    QRadioButton(parent)
{


}

void Radio_my::mouseDoubleClickEvent(QMouseEvent *event)
{
    qDebug("radio mouseDoubleClickEvent");
    if(Qt::LeftButton != event->button())//仅相应左键双击
        return;

    bool isOK;
    QString text = QInputDialog::getText(NULL, "自定义检索内容",
                                               "请输入要搜索的文字",
                                               QLineEdit::Normal,
                                               this->text(),
                                               &isOK);
    if(!isOK) return;
    this->setText(text);

}
